# -*- coding: utf-8 -*-
# @Time    : 2023/9/19 15:16
# @Author  : chenyinhua
# @File    : repo_common_page.py
# @Software: PyCharm
# @Desc:

# 标准库导入
# 第三方库导入
# 本地应用/模块导入
from case_utils.base_page import BasePage


class RepoCommonPage(BasePage):

    def click_repo_nav_button(self, nav):
        self.click(f"xpath=//span[text()='{nav}']")

    def check_project_private_label(self, visible=False):
        """
        检查项目私有标签
        """
        if visible:
            self.is_element_visible(locator="xpath=//span[text()='私有']")
        else:
            self.is_element_hidden(locator="xpath=//span[text()='私有']")
